package com.esm.md11.activity;

import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

import androidx.localbroadcastmanager.content.LocalBroadcastManager;

import com.alibaba.fastjson.JSONObject;
import com.esm.md11.R;
import com.esm.md11.database.dbmodel.SystemAllInfo;
import com.esm.md11.database.manager.SystemCenter;
import com.esm.md11.util.Config;
import com.esm.md11.util.HttpRequest;
import com.esm.md11.util.NotificationUtils;
import com.esm.md11.util.Utils;

import zuo.biao.library.base.BaseActivity;
import zuo.biao.library.interfaces.OnHttpResponseListener;
import zuo.biao.library.ui.AlertDialog;
import zuo.biao.library.util.JSON;

public class MainActivity extends BaseActivity implements View.OnClickListener, AlertDialog.OnDialogButtonClickListener {

    private final String TAG = "MainActivity";

    public static Intent createIntent(Context context) {
        return new Intent(context, MainActivity.class);
    }

    @Override
    public Activity getActivity() {
        return this;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main_activity);

        initView();
        initData();
        initEvent();
    }

    @Override
    public void onBackPressed() {
        super.onBackPressed();
    }


    @Override
    public void onForwardClick(View v) {

    }

    private TextView tv_code;
    private TextView tv_order;
    TextView tv_jiancchu;
    TextView tv_loujian;
    TextView tv_chupan;
    TextView tv_x;
    TextView tv_left;
    TextView tv_right;
    TextView tv_hege;
    TextView tv_jinshu;

    TextView tv_jiaozheng;
    TextView tv_mode;
    TextView tv_setting;
    TextView tv_exit;
    TextView tv_state;

    @Override
    public void initView() {
        tv_code = (TextView) findViewById(R.id.tv_code);
        tv_order = (TextView) findViewById(R.id.tv_order);
        tv_jiancchu = (TextView) findViewById(R.id.tv_jiancchu);
        tv_loujian = (TextView) findViewById(R.id.tv_loujian);
        tv_chupan = (TextView) findViewById(R.id.tv_chupan);
        tv_x = (TextView) findViewById(R.id.tv_x);
        tv_left = (TextView) findViewById(R.id.tv_left);
        tv_right = (TextView) findViewById(R.id.tv_right);
        tv_hege = (TextView) findViewById(R.id.tv_hege);
        tv_jinshu = (TextView) findViewById(R.id.tv_jinshu);

        tv_jiaozheng = (TextView) findViewById(R.id.tv_jiaozheng);
        tv_mode = (TextView) findViewById(R.id.tv_mode);
        tv_setting = (TextView) findViewById(R.id.tv_setting);
        tv_exit = (TextView) findViewById(R.id.tv_exit);
        tv_state = (TextView) findViewById(R.id.tv_state);
    }

    @Override
    public void initData() {

    }

    @Override
    public void initEvent() {
        findViewById(R.id.tv_jiaozheng).setOnClickListener(this);
        findViewById(R.id.tv_mode).setOnClickListener(this);
        findViewById(R.id.tv_setting).setOnClickListener(this);
        findViewById(R.id.tv_exit).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            default:
                break;
            case R.id.tv_jiaozheng:
                break;
            case R.id.tv_mode:
                break;
            case R.id.tv_setting:
                break;
            case R.id.tv_exit:
                finish();
                break;
        }
    }

    @Override
    protected void onResume() {
        super.onResume();
    }

    @Override
    protected void onPause() {
        super.onPause();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }

    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (resultCode != RESULT_OK) {
            return;
        }
    }

    @Override
    public void onDialogButtonClick(int requestCode, boolean isPositive) {

    }
}

